#ifndef SEMANTIC_VISITOR_H
#define SEMANTIC_VISITOR_H

#include "Visitor.h"
#include "SymbolTable.h"
#include <stack>
#include <string>

class SemanticVisitor : public Visitor
{
	public:
		SemanticVisitor(SymbolTable * Sym):
			sym(Sym)
		{}
		void visitChar( Char* );
		void visitCommand( Command* );
		void visitId( Id* );
		void visitIndex( Index* );
		void visitNumber( Number* );
		void visitStatementList( StatementList* );
		void visitString( String* );

		void visitAdd( Add* );
		void visitSub( Sub* );
		void visitMul( Mul* );
		void visitDiv( Div* );
		void visitMod( Mod* );
		void visitNeg( Neg* );
		void visitEqu( Equ* );

		void visitDoubleEqual( DoubleEqual* );
		void visitNotEqual( NotEqual* );
		void visitLess( Less* );
		void visitLessEqual( LessEqual* );
		void visitGreater( Greater* );
		void visitGreaterEqual( GreaterEqual* );
		void visitAnd( And* );
		void visitOr( Or* );

		void visitWhile( While* );
		void visitIf( If* );

		void visitFunctionCall( FunctionCall * );
		void visitFunctionDefinition( FunctionDefinition * );
		void visitReturn( Return * );
		void visitParamNode( ParamNode * );
		void visitArgNode( ArgNode * );

	private:
		std::stack<etype> stk;
		SymbolTable * sym;
};

#endif

